﻿using System;
using System.ComponentModel;
using PetaPoco;
using PmSoft;
using PmSoft.Caching;

namespace Modules
{
    /// <summary>
    /// app版本控制
    ///</summary>
    [TableName("app_version")]
    [Description("app版本控制")]
    [PrimaryKey("Id", AutoIncrement = true)]
    [CacheSetting(true)]
    [Serializable]
    public class AppVersion:IEntity
    {
        /// <summary>
        ///  
        ///</summary>
         [Column("id"  )]
         public int Id { get; set; }
        /// <summary>
        /// 版本号 
        ///</summary>
         [Column("version_code"  )]
         public int VersionCode { get; set; }
        /// <summary>
        /// 版本名称 
        ///</summary>
         [Column("version_name"  )]
         public string VersionName { get; set; }
        /// <summary>
        /// 下载地址 
        ///</summary>
         [Column("download_url"  )]
         public string DownloadUrl { get; set; }
        /// <summary>
        /// Apk大小（单位：KB） 
        ///</summary>
         [Column("apk_size"  )]
         public int ApkSize { get; set; }
        /// <summary>
        /// Apk Md5密钥 
        ///</summary>
         [Column("apk_md5"  )]
         public string ApkMd5 { get; set; }
        /// <summary>
        /// 上传时间 
        ///</summary>
         [Column("upload_time"  )]
         public DateTime UploadTime { get; set; }
        /// <summary>
        /// 说明 
        ///</summary>
         [Column("modify_content"  )]
         public string ModifyContent { get; set; }
        /// <summary>
        /// 支持机型，用,隔开，如(a,b,c,d)，若为空则所有机型 
        ///</summary>
         [Column("supported_models"  )]
         public string? SupportedModels { get; set; }
        /// <summary>
        /// 创建时间 
        ///</summary>
         [Column("create_time"  )]
         public DateTime CreateTime { get; set; }

    #region IEntity 成员

        [Ignore]
        object IEntity.EntityId { get { return this.Id; } }

      #endregion

    }
}
